import "./index.css";
import React, { useContext } from "react";
import { TestContext } from "@/utils/symbol";
import { Button } from "antd";

function MyTestOne() {
  const { myCount, handleClick, handleClear } = useContext(TestContext);

  const handleButton = () => {
    handleClick();
  };
  return (
    <>
      <div>这是我都测试context上下文的组件1~~~~~{myCount}@@@@@@@</div>
      <Button onClick={handleButton}>点击我改变上下文</Button>
      <div>
        <Button onClick={()=>handleClear()}>清空</Button>
      </div>
    </>
  );
}

export default MyTestOne;
